\(\int \csc ^n(a+b x) \, dx\) [37]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 8, antiderivative size = 69 \[ \int \csc ^n(a+b x) \, dx=\frac {\cos (a+b x) \csc ^{-1+n}(a+b x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\sin ^2(a+b x)\right )}{b (1-n) \sqrt {\cos ^2(a+b x)}} \]

[Out]

cos(b*x+a)*csc(b*x+a)^(-1+n)*hypergeom([1/2, 1/2-1/2*n],[3/2-1/2*n],sin(b*x+a)^2)/b/(1-n)/(cos(b*x+a)^2)^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3857, 2722} \[ \int \csc ^n(a+b x) \, dx=\frac {\cos (a+b x) \csc ^{n-1}(a+b x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\sin ^2(a+b x)\right )}{b (1-n) \sqrt {\cos ^2(a+b x)}} \]

[In]

Int[Csc[a + b*x]^n,x]

[Out]

(Cos[a + b*x]*Csc[a + b*x]^(-1 + n)*Hypergeometric2F1[1/2, (1 - n)/2, (3 - n)/2, Sin[a + b*x]^2])/(b*(1 - n)*S
qrt[Cos[a + b*x]^2])

Rule 2722

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*((b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1
)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n
}, x] &&  !IntegerQ[2*n]

Rule 3857

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x])^(n - 1)*((Sin[c + d*x]/b)^(n - 1)
*Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = \csc ^n(a+b x) \sin ^n(a+b x) \int \sin ^{-n}(a+b x) \, dx \\ & = \frac {\cos (a+b x) \csc ^{-1+n}(a+b x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-n}{2},\frac {3-n}{2},\sin ^2(a+b x)\right )}{b (1-n) \sqrt {\cos ^2(a+b x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.86 \[ \int \csc ^n(a+b x) \, dx=-\frac {\cos (a+b x) \csc ^{-1+n}(a+b x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+n}{2},\frac {3}{2},\cos ^2(a+b x)\right ) \sin ^2(a+b x)^{\frac {1}{2} (-1+n)}}{b} \]

[In]

Integrate[Csc[a + b*x]^n,x]

[Out]

-((Cos[a + b*x]*Csc[a + b*x]^(-1 + n)*Hypergeometric2F1[1/2, (1 + n)/2, 3/2, Cos[a + b*x]^2]*(Sin[a + b*x]^2)^
((-1 + n)/2))/b)

Maple [F]

\[\int \csc \left (x b +a \right )^{n}d x\]

[In]

int(csc(b*x+a)^n,x)

[Out]

int(csc(b*x+a)^n,x)

Fricas [F]

\[ \int \csc ^n(a+b x) \, dx=\int { \csc \left (b x + a\right )^{n} \,d x } \]

[In]

integrate(csc(b*x+a)^n,x, algorithm="fricas")

[Out]

integral(csc(b*x + a)^n, x)

Sympy [F]

\[ \int \csc ^n(a+b x) \, dx=\int \csc ^{n}{\left (a + b x \right )}\, dx \]

[In]

integrate(csc(b*x+a)**n,x)

[Out]

Integral(csc(a + b*x)**n, x)

Maxima [F]

\[ \int \csc ^n(a+b x) \, dx=\int { \csc \left (b x + a\right )^{n} \,d x } \]

[In]

integrate(csc(b*x+a)^n,x, algorithm="maxima")

[Out]

integrate(csc(b*x + a)^n, x)

Giac [F]

\[ \int \csc ^n(a+b x) \, dx=\int { \csc \left (b x + a\right )^{n} \,d x } \]

[In]

integrate(csc(b*x+a)^n,x, algorithm="giac")

[Out]

integrate(csc(b*x + a)^n, x)

Mupad [F(-1)]

Timed out. \[ \int \csc ^n(a+b x) \, dx=\int {\left (\frac {1}{\sin \left (a+b\,x\right )}\right )}^n \,d x \]

[In]

int((1/sin(a + b*x))^n,x)

[Out]

int((1/sin(a + b*x))^n, x)